package com.ruoyi.iot.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 设备对象 iot_device
 *
 * @author ruoyi
 * @date 2022-12-27
 */
public class IotDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @Excel(name = "id")
    private Long id;

    /** 编号 */
    @Excel(name = "编号")
    private String devId;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 是否在线 */
    @Excel(name = "是否在线")
    private Integer online;

    /** 是否故障（0 故障 1正常） */
    @Excel(name = "是否故障", readConverterExp = "0故障,1正常")
    private Integer isFault;

    /** 项目id */
    @Excel(name = "项目id")
    private Long projectId;

    /** 产品id */
    @Excel(name = "产品id")
    private Long productId;



    /** 创建者 */
    @Excel(name = "创建者")
    private Long creator;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 更新者 */
    @Excel(name = "更新者")
    private Long updater;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setDevId(String devId)
    {
        this.devId = devId;
    }

    public String getDevId()
    {
        return devId;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setOnline(Integer online)
    {
        this.online = online;
    }

    public Integer getOnline()
    {
        return online;
    }
    public void setIsFault(Integer isFault)
    {
        this.isFault = isFault;
    }

    public Integer getIsFault()
    {
        return isFault;
    }
    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }

    public Long getProjectId()
    {
        return projectId;
    }
    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setCreator(Long creator)
    {
        this.creator = creator;
    }

    public Long getCreator()
    {
        return creator;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }
    public void setUpdater(Long updater)
    {
        this.updater = updater;
    }

    public Long getUpdater()
    {
        return updater;
    }
    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate()
    {
        return updateDate;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("devId", getDevId())
            .append("name", getName())
            .append("online", getOnline())
            .append("isFault", getIsFault())
            .append("projectId", getProjectId())
            .append("productId", getProductId())
            .append("remark", getRemark())
            .append("creator", getCreator())
            .append("createDate", getCreateDate())
            .append("updater", getUpdater())
            .append("updateDate", getUpdateDate())
            .toString();
    }
}
